<template>
  <h2>{{route.meta.title}}</h2>
  <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
    <el-tab-pane v-for="v in date" :key="v.name" :label="v.weekTime" :name="v.name">
      <seatDetail></seatDetail>
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import { useRoute } from 'vue-router'
import { reactive,toRefs } from 'vue'
// 组件引入
import seatDetail from '../../components/seatDetail.vue'
export default {
  setup () {
    const route = useRoute()
    const data = reactive({
      // 状态
      activeName: 0,
      date:[
        {weekTime:'周五5月9日',name:'0'},
        {weekTime:'周六5月10日',name:'1'},
        {weekTime:'周日5月11日',name:'2'},
        {weekTime:'周一5月12日',name:'3'},
        {weekTime:'周二5月13日',name:'4'},
        {weekTime:'周三5月14日',name:'5'},
      ],
      // 方法
      handleClick() {
        // 改变状态
      }
    })

    return {...toRefs(data),route}
  },
  components : {
    seatDetail
  }
}
</script>

<style lang="scss" scoped>
h2 {
  margin: none;
  font-size: 18px;
}
</style>